@extends('admin.public.master')
@section('content')
    <div class="content-wrapper">
        <div class="content-wrapper-before"></div>
        <div class="content-header row">
            <div class="content-header-left col-md-1 col-4 mb-2">
                <a href="{{route('attribute.attribute.index')}}"><h5 class="content-header-title">属性列表</h5></a>
            </div>
            <div class="content-header-left col-md-1 col-4 mb-2">
                <a href="{{route('attribute.attribute.create')}}"><h5 class="content-header-title">添加属性</h5></a>
            </div>
        </div>
        <form action="{{route('attribute.attribute.store')}}" method="post">
            @csrf
            <div class="content-body">
                <div class="card">
                    <div class="card-body">
                        <div class="row">
                            <div class="col-6">
                                <div class="form-group">
                                    <label for="">属性名称</label>
                                    <input type="text" class="form-control" name="name"  aria-describedby="helpId" placeholder="">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-6">
                                <div class="form-group">
                                    <label for="">父级属性</label>
                                    <select class="form-control" name="pid" id="">
                                        <option value="0">顶级属性</option>
                                        @foreach($attrs as $attr)
                                        <option value="{{$attr->id}}">{{$attr->name}}</option>
                                            @endforeach
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="card-footer text-muted " >
                        <button type="submit" class="btn btn-primary ">保存数据</button>
                    </div>
                </div>
            </div>
        </form>
    </div>

@endsection

